_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module
authorDebian Python Team <team+python@tracker.debian.org>
Mon, 11 Apr 2022 12:08:09 +0000 (13:08 +0100)
committerJulien Cristau <jcristau@debian.org>
Mon, 11 Apr 2022 12:08:09 +0000 (13:08 +0100)
commitb62e493eebefc81060d21fb0fbf3f396a385b6bc
tree10cbc0d0bb8dbce7aa7b835568fa61975d57bcdb
parent348fe90f1ed7bece39ddc13bb07b20ec358937a1
_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module

# HG changeset patch
# User Julien Cristau <jcristau@debian.org>
# Date 1649506532 -7200
#      Sat Apr 09 14:15:32 2022 +0200
# Node ID 410916fc5935c7855c2cf4876d8311d34aabc29a
# Parent  96cc0ab5e1e68e4e163e8933842f908dcf42897a
sslutil: avoid deprecation warnings from python 3.10's ssl module

Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and
SSLContext.{min,max}imum_version when supported (3.7+).

And, catch deprecation warnings when the user asks for deprecated TLS
versions (1.0 and 1.1).

Differential Revision: https://phab.mercurial-scm.org/D12488

Gbp-Pq: Topic py310
Gbp-Pq: Name 3_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module.patch
mercurial/sslutil.py